<%@ page import="com.dingpeikeji.quickdeer.modules.rentproduct.entity.TDemands" contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<c:set var="REACTSTATUS_WAIT" value="<%=TDemands.REACTSTATUS_WAIT %>" />
<c:set var="REACTSTATUS_DONE" value="<%=TDemands.REACTSTATUS_DONE %>" />
<c:set var="REACTSTATUS_SURE" value="<%=TDemands.REACTSTATUS_SURE %>" />
<html>
<head>
<title>发票信息管理</title>
<link href="${ctxStatic }/xiake/css/list.css" rel='stylesheet'type='text/css' />
<link href="${ctxStatic }/xiake/css/style.css" rel='stylesheet'type='text/css' />
<link href="${ctxStatic }/index/css/receipt.css" rel='stylesheet'type='text/css' />
<%@ include file="/WEB-INF/views/layouts/head.jsp" %>
<script src="${ctxStatic }/jquery/jquery-1.8.3.min.js"></script>
<script src="${ctxStatic }/index/js/Personal.js"></script>
<script type="text/javascript">
$(function(){
	$('#inf_safe').trigger('click');
	var tabid  = "${param.id}";
	//既触发了a标签的点击事件，又触发了页面跳转   
	if(tabid.length>0){
		document.getElementById(tabid).click();   
	}
	$("#tab").click(function(){
		window.location.href = "${ctxFront}/orders/orderList";
	})
	$("#per").click(function(){
		window.location.href = "${ctxFront }/modifyUserInfo";
	})
	$("#fp").click(function(){
		window.location.href = "${ctxFront }/usersRcpt/ordersList";
	})
});
	function check(){
		var title = $('#title');
		var receiver = $('#receiver');
		var address = $('#address');
		var postcode = $('#postcode');
		var dutyParagraph = $('#dutyParagraph');
		var content = $('#titles');
		var r = /^1[3|4|5|7|8]\d{9}$/;
		var r2 = /^[1-9][0-9]{5}$/;
		//var r3 = /^[A-Z0-9]{15}$|^[A-Z0-9]{17}$|^[A-Z0-9]{18}$|^[A-Z0-9]{20}$/;
		var mobile = $('#mobile');
		if($.trim(mobile.val()) == ''){
			alert('请填写手机号');
			mobile.focus();
			return;
		} else if(!r.test(mobile.val())){
			alert('手机号不正确');
			mobile.focus();
			return;
		}
		if($.trim(postcode.val()) == ''){
			alert('请填写邮编');
			postcode.focus();
			return;
		} else if(!r2.test(postcode.val())){
			alert('邮编不正确');
			postcode.focus();
			return;
		}
		if($.trim(title.val())==''){
			alert('请填写发票抬头！');
			title.focus();
			return;
		}
		if($.trim(receiver.val())==''){
			alert('收件人不能为空！');
			receiver.focus();
			return;
		}
		if($.trim(dutyParagraph.val())==''){
				alert('税号格式不正确');
				dutyParagraph.focus();
				return;
		}
		if($.trim(content.val())==''){
			alert('发票内容必填！');
			content.focus();
			return;
		}
		if($.trim(address.val())==''){
			alert('地址！');
			address.focus();
			return;
		}
		$('#inputForm').submit();
	}
</script>
</head>
<body>
<div class="member">
    <div class="member_1">
        <h4>会员中心</h4>
    </div>
    <div class="container">

        <ul class="tabs" style="float: left">
            <li id="tab"><a href="#tab2">我的订单</a></li>
            <li id="fp"><a href="#tab3">关于发票</a></li>
            <li id="per"><a href="#tab1">个人中心</a></li>
        </ul>
    </div>
    <div class="infor_mange" style="float: right">
    <form id="inputForm" action="${ctxFront }/usersRcpt/save" method="get">
    <input type="hidden" name="alwaysid" value="${tUsersRcpt.alwaysid }"/>
    <input type="hidden" name="outkmsfee" value="${tUsersRcpt.outkmsfee }"/>
    <input type="hidden" name="outtimefee" value="${tUsersRcpt.outtimefee }"/>
    <input type="hidden" name="dirverfee" value="${tUsersRcpt.dirverfee }"/>
   	<input type="hidden" name="userid" value="${tUsersRcpt.userid }"/>
   	<input type="hidden" name="rcptIds" value="${rcptIds }"/>
        <div class="manage">
            <h4 class="manage_0">发票信息管理&nbsp;:</h4>
            <div class="type">
                <dl>
                    <dd>
                        <span class="type_0">发票类型&nbsp;:</span>
                        <input type="checkbox" name="" value=""class="xuanze" checked="checked">
                        <span class="added-value">增值税普通发票</span>
                    </dd>
                    <dd class="title_0">
                        <span class="invoice_title">发票抬头&nbsp;:</span>
                        <input id="title" name="title" type="text" placeholder="个人/企业名称" value="${tUsersRcpt.title }">
                        <span class="red">*必填</span>
                    </dd>
                    <dd class="title_0">
                        <span class="invoice_title">纳税人识别号&nbsp;:</span>
                        <input id="dutyParagraph" name="dutyParagraph" type="text" placeholder="企业必填" value="${tUsersRcpt.dutyParagraph }">
                    </dd> 
                   <dd class="title_0">
                        <span class="invoice_title">发票内容&nbsp;:</span>
                        <input id="titles" name="content" type="text" placeholder="为保证您的权益,请准确填写" value="代办租车费" readonly="readonly">
                        <span class="red">*必填</span>
                    </dd>
                    <dd class="recipients">
                        <span class="recipients_0">收件人&nbsp;:</span>
                        <input id="receiver" name="receiver" type="text" placeholder="请输入收件人名称" value="${tUsersRcpt.receiver }">
						<span class="red">*必填</span>
                    </dd>
                    <dd class="cell-phone">
                        <span class="cell-phone_0">手机号&nbsp;:</span>
                        <input id="mobile" name="mobile" type="text" placeholder="请输入手机号" value="${tUsersRcpt.mobile }">
						<span class="red">*必填</span>
                    </dd>
                    <dd class="address">
                        <span class="address_0">邮寄地址&nbsp;:</span>
                        <input id="address" name="address" type="text" placeholder="请输入收件地址" value="${tUsersRcpt.address }">
						<span class="red">*必填</span>
                    </dd>
                    <dd class="zip_code">
                        <span class="zip_code_0">邮编&nbsp;:</span>
                        <input id="postcode" name="postcode" type="text" placeholder="请输入邮编" value="${tUsersRcpt.postcode }">
						<span class="red">*必填</span>
                    </dd>
                    <dd class="click">
                    <c:if test="${buttonname=='保存' }"><input type="button" class="submit" value="保存" onclick="check();"></c:if>
                    <c:if test="${buttonname!='保存' }"><input type="button" class="submit" value="提交" onclick="check();"></c:if>
                        <!-- <input type="button" class="submit" value="提交" onclick="check();"> -->
                        <!--<input type="button" class="return" value="返回">-->
                    </dd>
                </dl>
            </div>

        </div>
</form>
    </div>
</div>
</body>
<%@ include file="/WEB-INF/views/layouts/foot.jsp" %>
</html>